<!DOCTYPE html>
<html lang="">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>这里是小洛的小站</title>
    <link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css">
</head>
<body>
<div class="layui-bg-cyan" style="height:100%">
    <div class="layui-row">
        <h1 style="text-align: center">大家好</h1>
        <h2 style="text-align: center">欢迎来到小洛的小站</h2>
    </div>
    <div class="layui-row" style="text-align: center">
        <button onclick="window.location='hi/flag'" >要为胜利而斗争</button> &emsp;
        <button onclick="window.location='student/list'">好朋友</button>&emsp;
        <button onclick="window.location='hi/say'">say</button>&emsp;
        <button onclick="window.location='hi/test'">test</button>&emsp;
        <button onclick="window.location='hi/db'">DB</button>&emsp;
        <button onclick="window.location='hi/zzw'">zzw</button>
    </div>
    <div class="layui-row" style="text-align: center">
        <img src="../images/最终幻想1.jpg" width="65%" height="65%" alt="我和宝宝的合影" onclick="ShowText()">
    </div>

</div>
</body>
</html>
<script src="//unpkg.com/layui@2.6.8/dist/layui.js"></script>
<script>
    layui.use(['layer', 'form'], function(){
        var layer = layui.layer
            ,form = layui.form;

        layer.msg('欢迎来到唐国毅的小站');
    });
    var song_text = String;
    song_text ="宝宝七夕节快乐呀！"
    function ShowText() {
        alert(song_text);
    }
    var curWwwPath = window.document.location.href;
    //获取主机地址之后的目录，如： uimcardprj/share/meun.jsp
    var pathName = window.document.location.pathname;
    var pos = curWwwPath.indexOf(pathName);
    var localhostPaht = curWwwPath.substring(0, pos);
    console.log(localhostPaht);
</script>
